package nGui.controls.menu;

import nGui.controls.menu.Item;
import nGui.controls.menu.IMenu;
import nGui.controls.Control;

class Menu extends Control, implements IMenu
{
	private var handle : String;

	public function new( handle : String )
	{
		super();
		this.__c = ngui_menu();
		this.handle = handle;
		setHandle( handle );
	}

	public function addItem( item : IMenu )
	{
		ngui_append_element( this.__c, item.__c );
	}

	static var ngui_menu = neko.Lib.load("nGui","ngui_element_menu",0);
	static var ngui_append_element = neko.Lib.load("nGui","ngui_append_element",2);
}
